#pragma once
#include<iostream>
#define maxNodeNum  20
#define INF 1e5
//�ڽӾ���Ķ���ṹ
typedef class {
public:
	int id;//������
	char* show;//����չʾ
}MatrixVertex;  

typedef int MartrixEdge;

//ͼ���ڽӾ����ʾ��
typedef class {
public:
	MatrixVertex vex[maxNodeNum];
	int nodeNum;
	MartrixEdge edge[maxNodeNum][maxNodeNum];
	int edgeNum;
	int direction;
}MGraph;

void initGraph(MGraph* graph, char* name[], int num,int direction,int edgevalue);
void releaseGraph(MGraph* graph);

void addMGraphEdge(MGraph* graph, int x, int y, int w);
void visitNode(MatrixVertex* node);

void DFS_MGraph(MGraph* graph, int v);
void BFS_MGraph(MGraph* graph, int v);
